package cn.wolfcode.trip.api.controller;

import cn.wolfcode.trip.base.domain.Answer;
import cn.wolfcode.trip.base.service.IAnswerService;
import cn.wolfcode.trip.base.util.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/answers")
public class AnswerController {
   @Autowired
    private IAnswerService answerService;
   @PostMapping
    public JsonResult save(Answer answer){
       answerService.save(answer);
       return new JsonResult();
   }

}
